'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING } = Sequelize;
    await queryInterface.createTable("pos_photo", {
      id: {
        type: INTEGER,
        primaryKey: true,
        autoIncrement: true,
        comment: "主键id，自增",
      },
      folderId: {
        type: INTEGER,
        allowNull: false,
        comment: "文件夹id",
    },
      url: {
        type: STRING,
        allowNull: false,
        comment: "图片路径",
      },
      fullUrl: {
        type: STRING,
        allowNull: false,
        comment: "图片全路径",
      },
    })
  },

  down: async (queryInterface) => {
    await queryInterface.dropTable("pos_photo");
  },
};
